// 封装本地持久化方法
// 因为存储有好几种方法localStorage, sessionStorage, cookie
// 若是以后项目要改存储方式，只需改变这里即可
// 封装： 为了统一管理，方便以后替换和修改
export const setStorage = (key, value) => {
  localStorage.setItem(key, value)
}

export const getStorage = (key) => {
  localStorage.getItem(key)
}

export const removeStorage = (key) => {
  localStorage.removeItem(key)
}

// 清除所有
export const clearStorage = () => {
  localStorage.clear()
}
